﻿using AiXiu.Model;
using System.Collections.Generic;

namespace AiXiu.IBLL
{
    /// <summary>
    /// 好友业务管理接口
    /// </summary>
    public interface IFriendManager
    {
        /// <summary>
        /// 获取好友列表
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <returns></returns>
        Dictionary<int, Friend> GetFriends(int selfId);

        /// <summary>
        /// 获取好友信息
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <returns></returns>
        Friend GetFriend(int selfId, int otherId);

        /// <summary>
        /// 是否是好友
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <returns></returns>
        bool IsFriend(int selfId, int otherId);

        /// <summary>
        /// 添加好友
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <returns></returns>
        bool AddFriend(int selfId, int otherId);

        /// <summary>
        /// 获取消息记录
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <param name="pageNumber"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Message> GetMessages(int selfId, int otherId, int pageNumber, int pageSize = 10);

        /// <summary>
        /// 发送消息
        /// </summary>
        /// <param name="selfId">自己的用户Id</param>
        /// <param name="otherId">对方的用户Id</param>
        /// <param name="content">消息内容</param>
        /// <returns></returns>
        bool SendMessage(int selfId, int otherId, string content);
    }
}